﻿using BaseData.Domain;
using BaseData.ErrorCode;
using BaseData.Infrastructure.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseData.Infrastructure.Depart
{
    public interface IDepartService
    {
        Task<int> AddDepart(Depts depts);

        Task<List<Depts>> GetAllDepts();

        Task<PaggingResult<List<DeptDto>>> GetDeptPage(int index,int size,string? name);

        Task<List<TreeItem>> GetDepartTree(int parentid);

        Task<int> UpdDept(Depts depts);

        Task<int> DelDept(int id);

        Task<int> DelDeptAll(string ids);

        Task<int> UpdateState(int deptId,bool state);
    }
}
